package com.jx.servicrimpl;

import com.jx.dao.FindSomeDepDao;
import com.jx.daoimpl.FindSomeDepDaoImpl;
import com.jx.service.FindSomeDepService;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class FindSomeDepServiceImpl implements FindSomeDepService {
	/**
	 * 模糊查询搜索的部门
	 * @author zzzzzzz
	 *
	 */
	FindSomeDepDao fsdd=new FindSomeDepDaoImpl();
	@Override
	public JSONObject findSomeDepService(String dname,int start,int pagesize) {
		// TODO Auto-generated method stub
		JSONObject json=new JSONObject();
		//分页
		json.put("total",fsdd.findTotalDep(dname));
		json.put("rows", JSONArray.fromObject(fsdd.findSomeDepDao(dname,start,pagesize)));
		return json;
	}

}
